package com.pet.server.po;

import static javax.persistence.GenerationType.IDENTITY;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * ProductInfo entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "product_info")
public class ProductInfo implements java.io.Serializable {

	// Fields
	private Integer id;
	private String productName;
	private Integer sellerId;
	private String icoPath;
	private String productHref;
	private String productCate;
	private String productBrand;
	private String productAge;
	private String petCate;
	private String source;
	private Date createDate;
	private Double productPrice;
	private Float salePrice;
	private String state;
	private String clientUrl;
	private String productDescription;
	private String productDetail;
	private List<ProductView> list=new ArrayList<ProductView>();
	
	
	// Constructors

	/** default constructor */
	public ProductInfo() {
	}
	

	/** minimal constructor */
	public ProductInfo(Integer id) {
		this.id = id;
	}

	
	
	/** full constructor */
	public ProductInfo(Integer id, String productName, Integer sellerId,
			String icoPath, String productCate, Timestamp createDate,
			Double productPrice, Float salePrice,
			String state,String image1,String image2,String image3) {
		this.id = id;
		this.productName = productName;
		this.sellerId = sellerId;
		this.icoPath = icoPath;
		this.productCate = productCate;
		this.createDate = createDate;
		this.productPrice = productPrice;
		this.salePrice = salePrice;
		this.state = state;
		
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}
	
	@Column(name = "PRODUCT_HREF", length = 256)
	public String getProductHref() {
		return productHref;
	}

	public void setProductHref(String productHref) {
		this.productHref = productHref;
	}

	@Column(name = "PRODUCT_NAME", length = 32)
	public String getProductName() {
		return this.productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}

	@Column(name = "SELLER_ID")
	public Integer getSellerId() {
		return this.sellerId;
	}

	public void setSellerId(Integer sellerId) {
		this.sellerId = sellerId;
	}

	@Column(name = "ICO_PATH", length = 64)
	public String getIcoPath() {
		return this.icoPath;
	}

	public void setIcoPath(String icoPath) {
		this.icoPath = icoPath;
	}

	@Column(name = "PRODUCT_CATE", length = 32)
	public String getProductCate() {
		return this.productCate;
	}

	public void setProductCate(String productCate) {
		this.productCate = productCate;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_DATE", length = 0)
	public Date getCreateDate() {
		return this.createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}


	@Column(name = "PRODUCT_PRICE", precision = 10)
	public Double getProductPrice() {
		return this.productPrice;
	}

	public void setProductPrice(Double productPrice) {
		this.productPrice = productPrice;
	}

	@Column(name = "SALE_PRICE", precision = 10)
	public Float getSalePrice() {
		return this.salePrice;
	}

	public void setSalePrice(Float salePrice) {
		this.salePrice = salePrice;
	}

	@Column(name = "STATE", length = 1)
	public String getState() {
		return this.state;
	}

	public void setState(String state) {
		this.state = state;
	}

	@Column(name = "pet_cate", length = 32)
	public String getPetCate() {
		return petCate;
	}


	public void setPetCate(String petCate) {
		this.petCate = petCate;
	}

	@Column(name = "source", length = 32)
	public String getSource() {
		return source;
	}


	public void setSource(String source) {
		this.source = source;
	}

	@Column(name = "product_brand", length = 32)
	public String getProductBrand() {
		return productBrand;
	}


	public void setProductBrand(String productBrand) {
		this.productBrand = productBrand;
	}

	@Column(name = "product_age", length = 32)
	public String getProductAge() {
		return productAge;
	}


	public void setProductAge(String productAge) {
		this.productAge = productAge;
	}

	@Column(name = "CLIENT_URL", length = 512)
	public String getClientUrl() {
		return clientUrl;
	}


	public void setClientUrl(String clientUrl) {
		this.clientUrl = clientUrl;
	}

	@Column(name = "product_description", length = 512)
	public String getProductDescription() {
		return productDescription;
	}


	public void setProductDescription(String productDescription) {
		this.productDescription = productDescription;
	}

	
	@Column(name = "product_detail", length = 1024)
	public String getProductDetail() {
		return productDetail;
	}


	public void setProductDetail(String productDetail) {
		this.productDetail = productDetail;
	}

	
}